package com.ymttest.common.enums;

/**
 * 优惠券的使用类型
 */
public enum ChannelSourceEnum {

	Other(0),

	Alipay(3),

	QQ(4),

	Weibo(5),

	WeiXin(6);

	private int intValue;
	private static java.util.HashMap<Integer, ChannelSourceEnum> mappings;

	private synchronized static java.util.HashMap<Integer, ChannelSourceEnum> getMappings() {
		if (mappings == null) {
			mappings = new java.util.HashMap<Integer, ChannelSourceEnum>();
		}
		return mappings;
	}

	private ChannelSourceEnum(int value) {
		intValue = value;
		ChannelSourceEnum.getMappings().put(value, this);
	}

	public int getValue() {
		return intValue;
	}

	public static ChannelSourceEnum forValue(int value) {
		return getMappings().get(value);
	}
}